int do_cd(char* pathName)
{
	MINODE* mip = 0;
	LOC inodeLoc;
	char fullPath[MAX_PATH_LENGTH];
	
	if (strlen(pathName) == 0)
		strcpy(fullPath, "/");
	else if (pathName[0] != '/')
	{
		get_pwd_name(runningProc->cwd, fullPath);
		strcat(fullPath, pathName);
	}
	else
		strcpy(fullPath, pathName);
		
	inodeLoc = get_inode_number(fullPath);
	if (inodeLoc.inodeNum == 0)
	{
		printf("%s does not exist\n\n", pathName);
		return -1;
	}
	
	mip = get_inode(inodeLoc.deviceHandle, inodeLoc.inodeNum);
	if (mip == 0)
		return -1;
		
	put_inode(runningProc->cwd);
	runningProc->cwd = mip;	
		
	return 1;
}
